package XMFramework.Interface
{
	public interface INetwork
	{
		/**
		 * 
		 * @param thisObj
		 * @param resHandler
		 * @param msgId
		 * @param params
		 * @param priority - <ul><li>ShareConstant.NET_PRIORITY_LOW</li><li>ShareConstant.NET_PRIORITY_MEDIUM</li><li>ShareConstant.NET_PRIORITY_HIGH</li><li>ShareConstant.NET_PRIORITY_IMMEDIATELY</li></ul>
		 * 
		 */		
		function addBucket( sessionParams:Array, resHandler:Function, msgId:int, params:*, priority:int = 5.0 ):int;
		
		/**
		 * 
		 * @param thisObj
		 * @param resHandler
		 * @param msgId
		 * @param params
		 * @param priority
		 * @return 
		 * 
		 */		
		function overrideBucket( sessionParams:Array, resHandler:Function, msgId:int, params:*, priority:int = 5.0 ):int;
		
		/**
		 * For test only 
		 * @param uri
		 * @param serviceName
		 * @param methodName
		 * @param responseFunc
		 * @param params
		 * 
		 */		
		function callService( uri : String, serviceName : String, methodName : String, responseFunc : Function, params : Array ) : void;
		
		function addGlobalResponseListener( func : Function ) : void;
		
		function flush() : void;
		
		function addNetStatusListener( func : Function ) : void;
		
		function connect() : Boolean;
		
		function counterReconnect():int;
	}
}